/*
 * DNSService.h
 *
 *  Created on: Dec 12, 2013
 *      Author: m
 */

#ifndef DNSSERVICE_H_
#define DNSSERVICE_H_
#include <string>
#include <rpc/rpc.h> /* always needed */

class DNSService
{
protected:
    static const std::string s_configFile;
    static CLIENT* s_client;

    static CLIENT* _createClient();

    static const char* getServerAddress();

public:
    static int resolve( std::string name );

    static void registerName( std::string name, int address );

    static void unregister( std::string name );
};

#endif /* DNSSERVICE_H_ */
